//
// Created by liuping on 2019/1/31.
//

#pragma once

#include <type_traits>

// 是否包含某个类型
template < typename T, typename... List >
struct Contains : std::true_type {};

template < typename T, typename Head, typename... Rest >
struct Contains<T, Head, Rest...> :
        std::conditional<std::is_same<T, Head>::value, std::true_type, Contains<T, Rest...>>::type
        {};

template < typename T >
struct Contains<T> : std::false_type{};
